package shared;

import java.io.Serializable;

public class Constants implements Serializable
{

    private static final long serialVersionUID = 6666L;

    public static final int REGISTRY_PORT = 1099;

    // The port number for data server and master server
    public static final int PORT = 5555;
    
    public static final int REMOTE_SAVER_PORT = 6666;

    // The remote object name for the master server
    public static final String MASTER_SERVER_NAME = "MasterServer";

    public static final String MASTER_SERVER_1_IP = "50.112.254.182";

    public static final String MASTER_SERVER_2_IP = "54.245.114.188";

    public static final String MASTER_SERVER_3_IP = "54.245.122.71";
    
    public static final int    IP_WAIT_TIME       = 15000;
    
    public static final String REMOTE_SAVER_NAME  = "RemoteSaver";

    // The remote object name for the data server
    public static final String DATASERVER_NAME = "DataServer";

    public static final String DATASERVER_DATASET_DIR = "/home/ubuntu/UserDataset/";

    public static final String MASTERSERVER_METAFILES_DIR = "/home/ubuntu/MasterMetafiles/";

    // The size of data chunk in unit of byte
    public static final int DATA_CHUNK_SIZE = 1024 * 1024;

    // The number of milliseconds after which the file lock is expired
    public static final long LOCK_EXPIRY_LENGTH = 1000 * 10;

    public static final long DATASERVER_EXPIRY_LENGTH = 1000 * 30;
    
    public static final long LOG_MONITOR_SLEEP_TIME   = 1000 * 5;
    
    public static final String MASTERSERVER_LOG_DIR= Constants.MASTERSERVER_METAFILES_DIR + "logs/";

    public static final String HASH_METHOD = "MD5";

}
